<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">

<div class="container-div ui-layout-center">
	<div class="row">
		<div class="col-sm-12 select-info">
			<form id="user-form">
				<input type="hidden" id="deptId" name="deptId">
				<input type="hidden" id="parentId" name="parentId">
				<div class="select-list">
					<ul>
						<li class="select-time">
							<label>开始时间：</label>
							<input type="text" class="time-input" id="startTime"  name="params[startTime]"/>
						</li>
						<li class="select-time">
							<label>结束时间：</label>
							<input type="text" class="time-input" id="endTime"  name="params[endTime]"/>
						</li>
						<li>
							科室：<select name="params[department]" th:with="type=${@dictss.selectKeShi()}">
							<option value=""> </option>
							<option th:each="dict : ${type}" th:text="${dict.keshi}" th:value="${dict.keshi}"></option>
						</select>
						</li>
						<li>
							<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
						</li>
					</ul>
				</div>
			</form>
		</div>


    <div class="container-div">
		<div class="btn-group hidden-xs" id="toolbar" role="group">
			<a class="btn btn-outline btn-success btn-rounded" >
				<i class="fa fa-plus"></i> 新增
			</a>
			<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.removeAll()" shiro:hasPermission="module:pool:remove">
				<i class="fa fa-trash-o"></i> 删除
			</a>
		</div>
			
		<div class="col-sm-12 select-table table-striped">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
    </div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('module:pool:edit')}]];
        var removeFlag = [[${@permission.hasPermi('module:pool:remove')}]];
        var prefix = ctx + "module/pool"

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                modalName: "汇总",
                columns: [{
		            checkbox: true
		        },
				{
					field : 'poolId', 
					title : '标识'
				},
				{
					field : 'doctor', 
					title : '医师' 
				},
				{
					field : 'objectName', 
					title : '项目名称' 
				},
				{
					field : 'size', 
					title : '规格' 
				},
				{
					field : 'unit', 
					title : '单位' 
				},
				{
					field : 'price', 
					title : '单价' 
				},
				{
					field : 'number', 
					title : '数量' 
				},
				{
					field : 'money', 
					title : '金额' 
				},
				{
					field : 'department', 
					title : '科室名称' 
				},
				{
					field : 'executeDepartment', 
					title : '执行科室' 
				},
				{
					field : 'classify', 
					title : '三级归类' 
				},
				{
					field : 'ofDate', 
					title : '日结日期' 
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.poolId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.poolId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
        layui.use('laydate', function(){
            var laydate = layui.laydate;
            laydate.render({
				elem: '#time2',
				type: 'datetime'
            });
        });
        layui.use('laydate', function(){
            var laydate = layui.laydate;
            laydate.render({
                elem: '#time1'
            });
        });
        $("table").click(function ss() {
            var ss=$("select[name='params[department]']").val();
			alert(ss);
        })
    </script>
</body>
</html>